﻿using System.Buffers;
using System.Collections.Generic;

namespace Xc.DataAccess.Protocoals.WaterMeters.Models.Responds
{
    /// <summary>
    /// 读取表计地址应答
    /// </summary>
    public class GetMeterAddressRespond : MeterFrameRxDataSegmentBase
    {
        public GetMeterAddressRespond()
        {
        }

        public GetMeterAddressRespond(MeterFrameRx dataArea) : base(dataArea)
        {
        }

        internal override IEnumerable<FrameCommand> ValidateCmd
        {
            get
            {
                yield return FrameCommand.CMD03RepOK;
                yield return FrameCommand.CMD03RepNG;
            }
        }

        internal override DataSegment ValidateDataSegment => DataSegment.GetMeterAddress;

        protected override bool SetData(ref SequenceReader<byte> sequenceReader)
        {
            return true;
        }
    }
}
